﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraSplashScreen;

namespace QLCONGNOAPPs.UserForms.FlashScreens
{
    public partial class frmFlash : SplashScreen
    {
        public frmFlash()
        {
            InitializeComponent();
        }
        double counterTick = 0.06;

        #region Overrides

        public override void ProcessCommand(Enum cmd, object arg)
        {
            base.ProcessCommand(cmd, arg);
        }

        #endregion

        public enum SplashScreenCommand
        {
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (this.Opacity > counterTick * 5)
                this.Opacity -= counterTick;
            else
            {
                ((Timer)sender).Enabled = false;
                ((Timer)sender).Stop();
                this.Close();
            }
        }

        private void frmFlash_Load(object sender, EventArgs e)
        {
            this.Opacity = 0.5;
            timer1.Start();
        }
    }
}